from fastapi import FastAPI, Form

app = FastAPI()

'''
1.2 Form 使用
'''
@app.post("/login/")
async def login(username: str = Form(), password: str = Form()):
    return {"username": username}




if __name__ == '__main__':
    import uvicorn
    uvicorn.run(app, host="127.0.0.1", port=8000)